//
//  File.swift
//  jiahui
//
//  Created by 3tee on 2024/12/3.
//

import Foundation
import UIKit
let iphone_scale = UIScreen.main.scale
let iphoneWidth_ratio: CGFloat = UIScreen.main.bounds.size.width / 375
let screen_width = UIScreen.main.bounds.size.width
let screen_height = UIScreen.main.bounds.size.height
let statusBar_height = UIApplication.shared.statusBarFrame.size.height
let is_iphoneX = statusBar_height > 20
let navigationBar_height = 44 + statusBar_height
let tabBar_height = 49 + (is_iphoneX ? 34.0 : 0)



func synchronized<T>(_ lock: AnyObject,_ body: () throws -> T) throws -> T {
    objc_sync_enter(lock)
    defer {
        objc_sync_exit(lock)
    }
    return try body()
}
